extends ../layout

block content
  h1.page-header Software
  a.btn.btn-primary(href='/admin/software/add') Agregar
  .table-responsive
    table.table.table-striped
      thead
        tr
          th #
          th Name
          th Enable?
          th Acciones
      tbody
        each software in softwares.length ? softwares : []
          tr
            td 1
            td= software.name
            td= software.enable
            td
              if software.enable
                a.btn.btn-warning(href='/admin/software/toggle/'+software._id) Deshabilitar
              else
                a.btn.btn-success(href='/admin/software/toggle/'+software._id) Habilitar
              a.btn.btn-primary(href='/admin/software/edit/'+software._id) Editar
              a.btn.btn-danger(href='/admin/software/destroy/'+software._id) Eliminar